hvm: correct time offset update in RTC write emulation
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 9 Mar 2010 09:57:25 +0000 (09:57 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 9 Mar 2010 09:57:25 +0000 (09:57 +0000)
commit9e4f8153248f3db4e240e803759c764d83a0e54c
tree7832afa2ba2b7cf004a8d01fd15c439b84910bf8
parent60440d9af3a721d9dc05f7cfd455624c0c328dfc
hvm: correct time offset update in RTC write emulation

mktime takes a month in 1..12 form while tm->tm_mon contains 0..11 so
we need to add 1. Without this fix setting the month back or forward a
month inside the guest would lead to the wrong number of days being
added/subtracted.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/x86/hvm/rtc.c